import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import Vant from "vant";
import "vant/lib/index.css";
import "./assets/fonts/iconfont.css";
import "./assets/download/iconfont.css";
import "./assets/ui.css";
import axios from "./axios.js";
Vue.use(axios);
// import "lib-flexible"; // 淘宝适配
import "amfe-flexible"; //rem适配
import { Lazyload } from "vant";
import store from "./store/index";

// 提示框
import { Dialog } from "vant";
Vue.use(Dialog);

Vue.use(Lazyload);
Vue.use(Vant);

// 引入better-scroll
// import Bscroll from "better-scroll";
// Vue.use(Bscroll);

// 引入vuex
import Vuex from "vuex";
Vue.use(Vuex);

// 高德地图
import AMap from "vue-amap";

Vue.use(AMap);

// import BetterScroll from "better-scroll";
// Vue.use(BetterScroll);

// import Vconsole from "vconsole";
// const vConsole = new Vconsole();
// Vue.use(vConsole);

// 引入视频插件
// import VideoPlayer from "vue-video-player";
// require("video.js/dist/video-js.css");
// require("vue-video-player/src/custom-theme.css");
// Vue.use(VideoPlayer);

// 跳转后返回顶部

router.beforeEach((to, from, next) => {
  // chrome
  document.body.scrollTop = 0;
  // firefox
  document.documentElement.scrollTop = 0;
  // safari
  window.pageYOffset = 0;
  next();
});

Vue.config.productionTip = false;
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
